.TH E1432_SET_TRIGGER 3 E1432
.SH NAME
.nf
e1432_set_trigger \- Set all trigger parameters except auto trigger
.fi
.IX e1432_set_trigger(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_trigger(E1432ID hw, SHORTSIZ16 ID,
                             SHORTSIZ16 chanState,
                             LONGSIZ32 delay, FLOATSIZ32 lowLevel,
                             FLOATSIZ32 highLevel, SHORTSIZ16 slope,
                             SHORTSIZ16 mode)
.cE
.SH DESCRIPTION
\fIe1432_set_trigger\fR sets all parameters associated with the
trigger section of an E1432 or group of E1432s, except the auto
trigger mode (see \fIe1432_set_auto_trigger\fR).

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained with a
call to \fIe1432_create_channel_group\fR, or the ID of a single channel.

\fIchanState\fR determines if the channel or group of channels can
digitally trigger a measurement.  \fBE1432_CHANNEL_ON\fR enables it to
trigger a measurement and sets the channel active, if it is not already
in that state.  \fBE1432_CHANNEL_OFF\fR disables it from
triggering the measurement.  This parameter may also be set with
\fIe1432_set_trigger_channel\fR in conjunction with
\fIe1432_set_active\fR.

\fIdelay\fR is the elapsed time, in number of samples, between the
occurrence of a trigger and the beginning of the data acquisition.  A
negative delay indicates a pre-trigger condition, where samples prior
to the trigger event are included in the first measurement block.  The
maximum and minimum amounts of trigger delay are determined by the
amount of ram available and the number of active channels in the E1432
modules.  This parameter may also be set with
\fIe1432_set_trigger_delay\fR.

\fIlowLevel\fR and \fIhighLevel\fR are the value of the two trigger
levels.  Their value ranges from roughly \fB-125%\fR to \fB+125%\fR.
These trigger levels may also be set with
\fIe1432_set_trigger_level\fR.  When \fImode\fR is set to
\fBE1432_TRIGGER_MODE_LEVEL\fR, the difference between the two levels
controls the amount of noise rejection, 10% is a good value to use
here.  For the AYF tachometer option the values are in volts and fall
between -25.0 and +25.0.

\fIslope\fR selects the edge of the trigger source (i.e. the
direction) on which the trigger occurs.  \fBE1432_TRIGGER_SLOPE_POS\fR
sets it to a positive crossing of the highLevel, or to an exit of the
bounded zone.  \fBE1432_TRIGGER_SLOPE_NEG\fR sets it to a negative
crossing of the lowLevel, or to an entry into the bounded zone.  This
parameter may also be set with \fIe1432_set_trigger_slope\fR.

\fImode\fR selects the operating mode of the trigger detection.
\fBE1432_TRIGGER_MODE_LEVEL\fR selects the positive or negative
crossing of a unique trigger level.  \fBE1432_TRIGGER_MODE_BOUND\fR
selects the exit from or entry to a zone bounded by the two trigger
levels.  This parameter may also be set with
\fIe1432_set_trigger_mode\fR.
.ne 6
.SH "RESET VALUE"
After a reset, \fIchanState\fR is set to \fBE1432_CHANNEL_ON\fR,
\fIdelay\fR is set to \fB0\fR, \fIlowLevel\fR is set to \fB-10%\fR for input
channels and \fB-0.05\fR volts for tach channels, \fIhighLevel\fR
is set to \fB0%\fR for input channels and \fB0.0\fR volts for tach channels, 
\fIslope\fR is set to
\fBE1432_TRIGGER_SLOPE_POS\fR, and \fImode\fR is set to
\fBE1432_TRIGGER_MODE_LEVEL\fR.
.ne 10
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_set_auto_trigger, e1432_set_trigger_channel,
e1432_set_trigger_delay, e1432_set_trigger_level,
e1432_set_trigger_mode, e1432_set_trigger_slope
.ad
